package com.uinnova.youshuyun.controller;


import com.uinnova.youshuyun.model.Instrument;
import com.uinnova.youshuyun.model.Result;
import com.uinnova.youshuyun.service.InstrumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *  前端控制器
 * @author jinshuo
 * @since 2021-03-15
 */
@RestController
@RequestMapping("/instrument")
public class InstrumentController {

    @Autowired
    private InstrumentService instrumentService;

    /**
     *@描述 根据测点编号获取测点详细数据
     *@参数 codes 若有多个测点编号则以","分隔，为空则默认查询全部数据
     *@返回值  Result
     *@创建人  jinshuo
     *@创建时间  2021-03-15
     *@修改人和其它信息
     */
    @GetMapping("queryListByCode")
    public Result<Instrument> queryListByCode(String codes){
        return instrumentService.queryListByCode(codes);
    }
}

